package com.dsj.cloud.zuul;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.zuul.EnableZuulProxy;

/**
 * zuul 作用：
 *   1. 作为spring cloud 的路由器 可以控制url到制定的服务或服务集群 类似nginx里的 rewrite
 *   2. 过滤（安全校验之类的），需要实现 ZuulFilter类
 * @author pacy.pan
 *
 */
@EnableZuulProxy
@EnableEurekaClient
@SpringBootApplication
public class ServiceZuulApplication {

    public static void main(String[] args) {
    	new SpringApplicationBuilder(ServiceZuulApplication.class).web(true).run(args); 
    }
}